home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / app / test / TestApplication.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  3.9 KB  |  108 lines

  1. package com.extensibility.app.test;
  2.  
  3. import com.extensibility.app.ApplicationPreferences;
  4. import com.extensibility.app.BaseApplication;
  5. import com.extensibility.app.BaseDocument;
  6. import com.extensibility.app.BaseWindow;
  7. import com.extensibility.app.BasicDialog;
  8. import com.extensibility.app.UI;
  9. import com.extensibility.rock.Platform;
  10. import com.extensibility.rock.RDialog;
  11. import com.extensibility.rock.Screen;
  12. import com.extensibility.util.Debug;
  13. import com.extensibility.xml.URI;
  14. import java.awt.Frame;
  15. import java.util.EventObject;
  16. import javax.swing.Icon;
  17. import javax.swing.JFrame;
  18. import javax.swing.JOptionPane;
  19.  
  20. public class TestApplication extends BaseApplication {
  21.    private static final String RESOURCE_PKG = "com.extensibility.app.test.rsc.";
  22.    private static final String VERSION = "Wednesday March 1, 2000";
  23.    private static final String SELF = "Apps";
  24.    private static final byte REG_VERSION = 0;
  25.  
  26.    public static void main(String[] var0) {
  27.       TestApplication var1 = new TestApplication();
  28.  
  29.       try {
  30.          ((BaseApplication)var1).startup();
  31.          ((BaseApplication)var1).doArgs(var0);
  32.       } catch (RuntimeException var4) {
  33.          JOptionPane.showMessageDialog(new JFrame(), Platform.mapNewlinesForTextArea(Debug.getStackTrace(var4)));
  34.          ((Throwable)var4).printStackTrace();
  35.          System.err.flush();
  36.          System.exit(0);
  37.       } catch (Throwable var5) {
  38.          String var3 = Platform.mapNewlinesForTextArea(String.valueOf(String.valueOf(var5.toString()).concat(String.valueOf(System.getProperty("line.separator")))).concat(String.valueOf("Application must now exit.")));
  39.          JOptionPane.showMessageDialog(new JFrame(), var3);
  40.          var5.printStackTrace();
  41.          System.err.flush();
  42.          System.exit(0);
  43.       }
  44.  
  45.    }
  46.  
  47.    public byte getRegVersion() {
  48.       return 0;
  49.    }
  50.  
  51.    public String getVersion() {
  52.       return "Wednesday March 1, 2000";
  53.    }
  54.  
  55.    protected UI createUI() {
  56.       return new 1(this);
  57.    }
  58.  
  59.    protected Class getMainWindowClass() {
  60.       return Class.forName("com.extensibility.app.test.TestApplication$TestWindow");
  61.    }
  62.  
  63.    protected BaseWindow createNewWindow(BaseDocument var1) {
  64.       return new TestWindow(var1);
  65.    }
  66.  
  67.    protected ApplicationPreferences createPreferences() {
  68.       return new ApplicationPreferences();
  69.    }
  70.  
  71.    public RDialog createPreferencesDialog(JFrame var1) {
  72.       BasicDialog var2 = new BasicDialog(var1, "preferences", (Icon)null, "there are no preferences", (Object[])null, (Object[])null, new String[]{"OK", "Cancel"});
  73.       Screen.centerInScreen(var2);
  74.       return var2;
  75.    }
  76.  
  77.    public JFrame createWelcome() {
  78.       return this.createNewWindow(new TestDocument("this is the welcome window"));
  79.    }
  80.  
  81.    public RDialog createPrintDialog(Frame var1) {
  82.       BasicDialog var2 = new BasicDialog(var1, "print", (Icon)null, "there are no print options", (Object[])null, (Object[])null, new String[]{"OK", "Cancel"});
  83.       Screen.centerInScreen(var2);
  84.       return var2;
  85.    }
  86.  
  87.    protected String getAbbr() {
  88.       return "Apps";
  89.    }
  90.  
  91.    public BaseDocument createNewDocument(URI var1) {
  92.       return new TestDocument();
  93.    }
  94.  
  95.    public BaseDocument createNewDocument(EventObject var1) {
  96.       return new TestDocument();
  97.    }
  98.  
  99.    protected String[] getOpenTypes() {
  100.       return new String[]{"test"};
  101.    }
  102.  
  103.    // $FF: synthetic method
  104.    static String access$2000071() {
  105.       return "com.extensibility.app.test.rsc.";
  106.    }
  107. }
  108.